package com.demo.extfunction;


import com.demo.annotation.Aspectj;
import com.demo.annotation.Around;
import com.demo.annotation.Component;
import com.demo.annotation.PointCut;
import com.demo.enhance.JoinPoint;

@Aspectj
@Component
public class Log {

//    @PointCut("com.demo.entity")
    public void pointCut(){};
    @Around
    public Object around(JoinPoint joinPoint) {
        System.out.println("----log---代理方法执行前---------------");
        Object ret = null;//真实方法执行
        try {
            ret = joinPoint.proceed();
        } catch (Throwable e) {
            e.printStackTrace();
        }
        System.out.println("-----log--代理方法执行后---------------");
        return ret;
    }
}
